﻿using System.ComponentModel.DataAnnotations;
using System;

namespace ISSMoviePlex.DAL.Models
{
    [MetadataType(typeof(MemberMetadata))]
    public partial class Member
    {
        public void Spend(float ammount)
        {
        }
    }

    public class MemberMetadata
    {
        [Required]
        [Display(Name = "Full Name")]
        public string MemberName { get; set; }

        [Required]
        [Display(Name = "Date Of Birth")]
        public DateTime DateOfBirth { get; set; }

        [Required]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "Invalid Email")]
        public string Email { get; set; }

        [Required]
        public string Address { get; set; }
    }
}
